import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { WebComponent } from './web.component';
import { PcComponent } from './pc/pc.component';
import { MobileComponent } from './mobile/mobile.component';
import {RouterModule, Routes} from '@angular/router';

const webRoutes: Routes = [
  {path: '', component: WebComponent, children: [
      {path: 'pc', component: PcComponent},
      {path: 'mobile', component: MobileComponent}
    ]}
];

@NgModule({
  imports: [
    CommonModule,
    RouterModule.forChild(webRoutes)
  ],
  declarations: [WebComponent, PcComponent, MobileComponent]
})
export class WebModule { }
